<!DOCTYPE html>
<html lang = "zh-cn">
    <head>
        <meta charset="UTF-8">
        <title>koa</title>
        <link rel="stylesheet" href="./css/basic.css">
    </head>
    <body>
        <h1>这个用户列表</h1>
        <br>
        <a href="user/add">增加用户</a>
        <br>
        <table>
            <tr>
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>操作</th>
            </tr>

            {{each list}}
            <tr>
                <td>{{$value.username}}</td>
                <td>{{$value.age}}</td>
                <td>{{$value.sex}}</td>
                <td><a href="user/edit?id={{@$value._id}}">编辑</a>
                    　<a href="user/delete?id={{@$value._id}}">删除</a></td>
            </tr>
            {{/each}}
        </table>
    </body>
</html> 